<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="sellInfoDetail.title"/></title>
    <meta name="heading" content="<fmt:message key='sellInfoDetail.heading'/>"/>
</head>

<form:form commandName="sellInfo" method="post" action="/app/sellInfoform" id="sellInfoForm" onsubmit="return validateSellInfo(this)">
<form:errors path="*" cssClass="error" element="div"/>
<form:hidden path="id"/>
<ul>
    <li>
        <appfuse:label styleClass="desc" key="sellInfo.bugType"/>
        <form:errors path="bugType" cssClass="fieldError"/>
        <form:input path="bugType" id="bugType" cssClass="text medium" cssErrorClass="text medium error" maxlength="30"/>
    </li>
    <!-- todo: change this to read the identifier field from the other pojo -->
    <s:select name="sellInfo.company.id" list="companyList" listKey="id" listValue="id"></s:select>
    <li>
        <appfuse:label styleClass="desc" key="sellInfo.createtime"/>
        <form:errors path="createtime" cssClass="fieldError"/>
        <form:input path="createtime" id="createtime" cssClass="text medium" cssErrorClass="text medium error" maxlength="255"/>
    </li>
    <li>
        <appfuse:label styleClass="desc" key="sellInfo.description"/>
        <form:errors path="description" cssClass="fieldError"/>
        <form:input path="description" id="description" cssClass="text medium" cssErrorClass="text medium error" maxlength="300"/>
    </li>
    <li>
        <appfuse:label styleClass="desc" key="sellInfo.logos"/>
        <form:errors path="logos" cssClass="fieldError"/>
        <form:input path="logos" id="logos" cssClass="text medium" cssErrorClass="text medium error" maxlength="100"/>
    </li>
    <li>
        <appfuse:label styleClass="desc" key="sellInfo.other"/>
        <form:errors path="other" cssClass="fieldError"/>
        <form:input path="other" id="other" cssClass="text medium" cssErrorClass="text medium error" maxlength="200"/>
    </li>
    <li>
        <appfuse:label styleClass="desc" key="sellInfo.persisttime"/>
        <form:errors path="persisttime" cssClass="fieldError"/>
        <form:input path="persisttime" id="persisttime" cssClass="text medium" cssErrorClass="text medium error" maxlength="255"/>
    </li>
    <li>
        <appfuse:label styleClass="desc" key="sellInfo.style"/>
        <form:errors path="style" cssClass="fieldError"/>
        <form:input path="style" id="style" cssClass="text medium" cssErrorClass="text medium error" maxlength="30"/>
    </li>
    <li>
        <appfuse:label styleClass="desc" key="sellInfo.style1"/>
        <form:errors path="style1" cssClass="fieldError"/>
        <form:input path="style1" id="style1" cssClass="text medium" cssErrorClass="text medium error" maxlength="30"/>
    </li>
    <li>
        <appfuse:label styleClass="desc" key="sellInfo.useby"/>
        <form:errors path="useby" cssClass="fieldError"/>
        <form:input path="useby" id="useby" cssClass="text medium" cssErrorClass="text medium error" maxlength="50"/>
    </li>

    <li class="buttonBar bottom">
        <input type="submit" class="button" name="save" value="<fmt:message key="button.save"/>"/>
        <c:if test="${not empty sellInfo.id}">
        <input type="submit" class="button" name="delete" onclick="bCancel=true;return confirmDelete('sellInfo')"
            value="<fmt:message key="button.delete"/>" />
        </c:if>
        <input type="submit" class="button" name="cancel" value="<fmt:message key="button.cancel"/>" onclick="bCancel=true"/>
    </li>
</ul>
</form:form>

<v:javascript formName="sellInfo" cdata="false" dynamicJavascript="true" staticJavascript="false"/>
<script type="text/javascript" src="<c:url value='/scripts/validator.jsp'/>"></script>

<script type="text/javascript">
    Form.focusFirstElement($('sellInfoForm'));
</script>
